package cn.dgut.training.entity.goods;

import cn.dgut.training.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="Cart对象", description="购物车商品表")
public class Cart extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户表的用户ID")
    private Long userId;

    @ApiModelProperty(value = "商品表的商品ID")
    private Long goodsId;

    @ApiModelProperty(value = "商品编号")
    private String goodsSn;

    @ApiModelProperty(value = "商品名称")
    private String goodsName;

    @ApiModelProperty(value = "商品货品表的货品ID")
    private Long productId;

    @ApiModelProperty(value = "商品货品的价格")
    private BigDecimal price;

    @ApiModelProperty(value = "商品货品的数量")
    private Integer productNumber;

    @ApiModelProperty(value = "商品规格值列表，采用JSON数组格式")
    private String specifications;

    @ApiModelProperty(value = "购物车中商品是否选择状态")
    private Boolean checked;

    @ApiModelProperty(value = "商品图片或者商品货品图片")
    private String picUrl;

//    @ApiModelProperty(value = "团购活动id")
//    private Long groupBuyingId;

}
